import Video from '../../../components/VideoWitness'
import styles from './videoWitness.scss'
import { connect } from 'dva'
const VideoWitness = ({dispatch}) => {
  const submit = () => {
    dispatch({
      type: 'modules/getModules',
      payload: {
        title: '手机号修改',
        process: 'modifyPhone',
        pathname: '',
        tokenId: 'test',
        businessId: '1231241220',
      }
    })
  }
  const oneWayVideo = () => {
    dispatch({
      type: 'modules/getModules',
      payload: {
        title: '手机号修改',
        process: 'modifyPhone',
        pathname: '',
        tokenId: 'test',
        businessId: '1231241222',
      }
    })
  }
  const oldPhoneChange = () => {
    dispatch({
      type: 'modules/getModules',
      payload: {
        title: '手机号修改',
        process: 'modifyPhone',
        pathname: '',
        tokenId: 'test',
        businessId: '1231241218',
      }
    })
  }
  const videoData = {
    submit,
    oneWayVideo
  }
  return (
    <div>
      <Video {...videoData}></Video>
      <div className={styles.oldPhone} onClick={oldPhoneChange}>通过旧手机号码修改</div>
    </div>
  )
}

export default connect(state => state.reset)(VideoWitness)